import "./App.css";
import { BrowserRouter as Router, Switch, Link } from "react-router-dom";

function App() {
  function fn() {
    console.log(window.a.b);
  }
  return (
    <div className="App">
      <Router>
        <>
          <nav>
            <ul>
              <li>
                <Link to="/">Home</Link>
              </li>
              <li>
                <Link to="/about">About</Link>
              </li>
            </ul>
          </nav>
          <Switch>
            <Router path="/about">about</Router>
            <Router path="/">
              <button onClick={fn}>Break the world</button>
            </Router>
          </Switch>
        </>
      </Router>
    </div>
  );
}

export default App;
